package com.itic.appbase.framework.type;

public enum AfterSaleType {
	
	change("002","换货原因"),cance("003","退款退货"),fix("004","维修"),refund("001","仅退款");
	private String state;
	private String name;
	AfterSaleType(String state, String name) {
		this.state = state;
		this.name = name;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public static AfterSaleType getType(String state) {
		
		AfterSaleType type = null;
		switch (state) {
		case "1":
			type = AfterSaleType.change;
			break;
		case "2":
			type = AfterSaleType.cance;
			break;
		case "3":
			type = AfterSaleType.fix;
			break;
		case "4":
			type = AfterSaleType.refund;
			break;
		default:
			break;
		}
		return type;
	}
}
